<template>
  <div class="h5-qr-container">
    <div class="qr-card">
      <div class="qr-header">
        <h2>H5扫码答题</h2>
        <p>使用手机扫描下方二维码进入答题系统</p>
      </div>
      <div class="qr-content">
        <div class="qr-image-wrapper">
          <img 
            src="/@/assets/h5.png" 
            alt="H5扫码答题二维码" 
            class="qr-image"
          />
        </div>
        <div class="qr-tips">
          <p>📱 请使用手机扫描二维码</p>
          <!-- <p>🌐 支持微信、支付宝等扫码工具</p> -->
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
// 无需额外的逻辑
</script>

<style lang="less" scoped>
.h5-qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.qr-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qr-header {
  margin-bottom: 30px;
  
  h2 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  p {
    color: #666;
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
  }
}

.qr-content {
  .qr-image-wrapper {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #e9ecef;
    transition: all 0.3s ease;
    
    &:hover {
      border-color: #667eea;
      background: #f0f2ff;
    }
  }
  
  .qr-image {
    max-width: 250px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    
    &:hover {
      transform: scale(1.05);
    }
  }
}

.qr-tips {
  margin-top: 25px;
  
  p {
    color: #666;
    font-size: 14px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    &:first-child {
      color: #28a745;
      font-weight: 500;
    }
    
    &:last-child {
      color: #17a2b8;
      font-weight: 500;
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .h5-qr-container {
    padding: 15px;
  }
  
  .qr-card {
    padding: 25px;
  }
  
  .qr-header h2 {
    font-size: 24px;
  }
  
  .qr-image {
    max-width: 200px;
  }
}
</style>
